﻿using System.Collections.Generic;
using System.IO;
using Isaac.Joy.Menu.Module;
using Isaac.Joy.Serialize;

namespace Isaac.Joy.WebFramework.DtCms
{
    public class TestMenus : IMenus
    {
        public IEnumerable<IMenu> Menus
        {
            get
            {
                var path = Path.Combine(Activator.BundleContext.Bundle.Location, "Menus.xml");
                return XmlSerializable.LoadFromXml<List<Menu.Module.Menu>>(path);
            }
        }
    }
}